package thread;

public class PriorityDemo {
    public static void main(String[] args) {
        Thread norm = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 1000; i++) {

                    System.out.println("nor");
                }

            }
        };
        Thread min = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 1000; i++) {

                    System.out.println("min");
                }
            }
        };
        Thread max = new Thread(){
            @Override
            public void run() {
                for (int i = 0; i < 1000; i++) {

                    System.out.println("max");
                }
            }
        };
        norm.setPriority(Thread.NORM_PRIORITY);
        min.setPriority(Thread.MIN_PRIORITY);
        max.setPriority(Thread.MAX_PRIORITY);
        norm.start();
        min.start();
        max.start();

    }
}
